import {BasePage, BaseInput} from "../../../../../ts/type";
import {replace} from "../../../../../ts/util";

export let entityLabelValueSearchInit = (page: BasePage) => {

// field input auto
// #bind.field.tableCode#
    page.search.formInputs.push(replace(new BaseInput('实体编码', 'tableCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entity/tableCode/select'
    }))
// $bind.field.tableCode$

// #bind.field.labelFieldCode#
    page.search.formInputs.push(replace(new BaseInput('Label属性名称', 'labelFieldCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entityColumn/fieldCode/select'
    }))
// $bind.field.labelFieldCode$

// #bind.field.valueFieldCode#
    page.search.formInputs.push(replace(new BaseInput('Value属性名称', 'valueFieldCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entityColumn/fieldCode/select'
    }))
// $bind.field.valueFieldCode$

// #bind.field.dataApiType#
    page.search.formInputs.push(new BaseInput('适用数据结构', 'dataApiType'))
// $bind.field.dataApiType$


    page.search.formInputs.push(new BaseInput('创建人', 'createBy'))
    page.search.formInputs.push(new BaseInput('修改人', 'updateBy'))
    page.search.formInputs.push(replace(new BaseInput('创建时间', 'createTime'), {
        inputType: 'dateRange'
    }))
    page.search.formInputs.push(replace(new BaseInput('修改时间', 'updateTime'), {
        inputType: 'dateRange'
    }))
}